AlertUtil = {
	_mask : '<div class="alert-mask ptr" id="alert-mask"></div>',
	show : function(title, content, okBack) {
		var id = 'randomid', num = arguments.length;
			if (num == 2) {
				content = title;
				title = '提示';
			}
		var html = [ '<div class="cen-in-cen alert-util text-cen" id=' + id + '>',
			'	<h4 class="alert-title pad-10">' + title + '</h4>',
			'	<div class="alert-con">' + content + '</div>',
			'	<div class="confirm-div">',
			'		<button type="button" class="btn btn-success ok">确认</button>',
			'	</div>',
			'</div>' ];
		$('body').append(html.join(''), this._mask);
		$('#' + id + ' .ok').on('click', function() {
			$('#' + id).remove();
			$('#alert-mask').remove();
			if (okBack)
				okBack();
		});
	},
	confirm : function(title, content, yesBack, noBack) {
		var num = arguments.length,
			id = 'randomid';
		if (num == 3) {
			noBack = yesBack;
			yesBack = content;
			content = title;
			title = '提示';
		}
		if (num == 2) {
			yesBack = content;
			content = title;
			title = '提示';
		}
		var html = [ '<div class="cen-in-cen alert-util text-cen" id=' + id + '>',
			'	<h4 class="alert-title pad-10">' + title + '</h4>',
			'	<div class="alert-con">' + content + '</div>',
			'	<div class="confirm-div">',
			'		<button type="button" class="btn btn-success yes">确认</button>',
			'		<button type="button" class="btn btn-primary no">取消</button>',
			'	</div>',
			'</div>' ];
		$('body').append(html.join(''), this._mask);
		$('#' + id + ' .yes').on('click', function() {
			yesBack();
			$('#' + id).remove();
			$('#alert-mask').remove();
		});

		$('#' + id + ' .no').on('click', function() {
			if (noBack)
				noBack();
			$('#' + id).remove();
			$('#alert-mask').remove();
		});
	}
}